import { request } from '@/utils/request.js'

export default {
    /**
     * 获取列表
     * @returns
     */
    getMemberLevelList (params = {}) {
        return request({
            url: 'mini/member_level/list',
            method: 'get',
            params
        })
    },
    memberLevelAdd (params = {}) {
        return request({
            url: 'mini/member_level/save',
            method: 'post',
            data:params
        })
    },
    memberLevelUpdate (id,params = {}) {
        return request({
            url: 'mini/member_level/update/'+id,
            method: 'put',
            data:params
        })
    },
    updateByField (params = {}) {
        return request({
            url: 'mini/member_level/updateByField',
            method: 'post',
            data:params
        })
    },

    memberLevelUpDel (params){
        return request({
            url: 'mini/member_level/up_del/',
            method: 'delete',
            params
        })
    },
    memberLevelUpSave (params){
        return request({
            url: 'mini/member_level/up_save/',
            method: 'put',
            data:params
        })
    },

    getLevelUpList(pid){
        return request({
            url: 'mini/member_level/get_up_list/'+pid,
            method: 'get',
        })
    },

    saveUpList(pid,params){
        return request({
            url: 'mini/member_level/save_up_list/'+pid,
            method: 'post',
            data:params
        })
    },
    delUpList(id){
        return request({
            url: 'mini/member_level/del_up_list/'+id,
            method: 'delete',
        })
    },
}
